package com.link.play.fit.ai.bean

import android.os.Parcel
import android.os.Parcelable
import com.link.play.fit.ai.kv.KVStore

/**
 *    var weekHabit: Int = 0,//1:0-2 ; 2:3-5 ; 3:6+
 *     var heigh: Int = 170,//身高
 *     var weight: Float = 60f,//体重
 *     var goal: Int = 0,//1:增重 ; 2:维持 ; 3:减肥
 *     var goalWeight: Int = 170,//目标体重
 *     var goalFast: Float = 0f,//实现目标的速度
 *     var isCm: Int = 0,//英尺  1：cm
 *
 */
data class AdjustGoalsData(var weekHabit: Int=0, var heigh: Int=160,var weight: Int=60, var ft: Int=0,var inches: Int=0,var isCm: Int=0,var goal: Int=0,var goalWeight: Float=70f, var goalFast: Int=0, var lbs: Int=0,var targetWeight: Int=0) : Parcelable{

    constructor(parcel: Parcel) : this(
        parcel.readInt(),
        parcel.readInt(),
        parcel.readInt(),
        parcel.readInt(),
        parcel.readInt(),
        parcel.readInt(),
        parcel.readInt(),
        parcel.readFloat(),
        parcel.readInt(),
        parcel.readInt(),
        parcel.readInt(),

    )

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeInt(weekHabit)
        parcel.writeInt(heigh)
        parcel.writeInt(weight)
        parcel.writeInt(ft)
        parcel.writeInt(inches)
        parcel.writeInt(isCm)
        parcel.writeInt(goal)
        parcel.writeFloat(goalWeight)
        parcel.writeInt(goalFast)
        parcel.writeInt(lbs)
        parcel.writeInt(targetWeight)

    }

    override fun describeContents(): Int = 0

    companion object CREATOR : Parcelable.Creator<AdjustGoalsData> {
        override fun createFromParcel(parcel: Parcel): AdjustGoalsData = AdjustGoalsData(parcel)
        override fun newArray(size: Int): Array<AdjustGoalsData?> = arrayOfNulls(size)
    }
}

